package net.minecraft.src;

import java.util.ArrayList;
import java.util.Random;

public class LF_BlockTVOff extends LF_BlockFurnitureBase
{
	public LF_BlockTVOff(int i, int j, Class class1, Material mat)
	{
		super(i, j, class1, mat);
	}

	public void onNeighborBlockChange(World world, int i, int j, int k, int l)
	{
		world.scheduleBlockUpdate(i,j,k,blockID,tickRate());
	}

	public void updateTick(World world, int i, int j, int k, Random random)
	{
		int m = world.getBlockMetadata(i, j, k);

		if(world.isBlockIndirectlyGettingPowered(i, j, k))
		{
			if(world.getBlockId(i, j, k) == this.blockID)
			{
				world.setBlockAndMetadata(i, j, k, mod_LF_GenericFurnitureMain.blockTVOn.blockID, m);
				world.scheduleBlockUpdate(i, j, k, mod_LF_GenericFurnitureMain.blockTVOn.blockID, tickRate());
			}
		}
	}

	public int tickRate()
	{
		return 5;
	}

	public int idDropped(int i, Random random, int j)
	{
		return mod_LF_GenericFurnitureMain.itemTV.shiftedIndex;
	}
}